﻿namespace TrinityEngine.SceneManagement
{
    public abstract class SceneBuilder : IDisposable
    {
        protected bool _disposed = false;

        ~SceneBuilder()
        {
            Dispose(false);
        }

        public abstract Scene Build();

        public void Dispose()
        {
            Dispose(true);
            GC.SuppressFinalize(this);
        }

        protected virtual void Dispose(bool disposing)
        {
            if (_disposed)
            {
                return;
            }

            if (disposing)
            {

            }

            _disposed = true;
        }
    }
}
